/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.user.mapper.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统岗位
 *
 * @author 陈建峰
 * @date 2023-02-06 23:25:52
 * @since v1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_user_post")
public class UserPost implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 岗位名称
     */
    @TableField("post_name")
    @NotBlank(message = "岗位名称不能为空!")
    @Length(max=255, message="岗位名称长度不大于255!")
    private String postName;

    /**
     * 岗位编码
     */
    @TableField("post_code")
    @Length(max=64, message="岗位编码长度不大于64!")
    private String postCode;

    /**
     * 岗位类型
     */
    @TableField("post_skill")
    @Length(max=64, message="岗位类型长度不大于64!")
    private String postSkill;

    /**
     * 排序
     */
    @TableField("sequence")
    @NotNull(message = "排序不能为空!")
    private Integer sequence;

    /**
     * 备注
     */
    @TableField("description")
    @Length(max=255, message="备注长度不大于255!")
    private String description;

    /**
     * 租户
     */
    @TableField("tenant_id")
    @Length(max=32, message="租户长度不大于32!")
    private String tenantId;

    /**
     * 创建人
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    private String createdBy;

    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 更新人
     */
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    private String updatedBy;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.UPDATE)
    private LocalDateTime updatedAt;

    /**
     * 数据标识
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    private Boolean deleted;


}
